Vue.component('dong-show',{
	props:{
		info:{
			type:Object,
			required:true
		},
		open:{
			type:Boolean,
			required:true
		}
	},
	mounted(){
		console.log(this.info)
		console.log(this.open)
	},
	methods:{
		closeFrom() {
			this.open = false;
			this.$emit('type',this.open)
		},
	},
	template:`
		<div class="modal fade show" style="display: block;" v-if="open">
			<div class="modal-dialog modal-lg" id="print">
				<div class="modal-content">
					<div class="modal-header">
						<h5 class="modal-title">打印导检单</h5>
						<button type="button" class="btn-close"
							@click="closeFrom()"></button>
					</div>
					<div class="modal-body">
						<form class="comment-form">
							<div class="row">
		
								<div class="col-lg-3">
									<div class="mb-3">
										<label
											class="text-black font-w600 form-label">姓名
											<span class="required">*</span></label>
										<input type="text" class="form-control" readonly
											id="fname" v-model="info.fname" name="fname"
											placeholder="姓名" style="border: 0px;">
									</div>
								</div>
								<div class="col-lg-3">
									<div class="mb-3">
										<label
											class="text-black font-w600 form-label">身份证号
											<span class="required">*</span></label>
										<input type="text" class="form-control" readonly
											placeholder="身份证号" name="fcardId"
											v-model="info.fcardId" id="fcardId"
											style="border: 0px;">
									</div>
								</div>
								<div class="col-lg-3">
									<div class="mb-3">
										<img :src="info.qrcode" width="100%"
											id="qrcode" />
									</div>
								</div>
								<div class="col-lg-3">
									<div class="mb-3">
										<label
											class="text-black font-w600 form-label">订单编号
											<span class="required">*</span></label>
										<input type="text" class="form-control" readonly
											placeholder="订单编号" name="orderSn"
											v-model="info.orderSn" id="orderSn"
											style="border: 0px;">
									</div>
								</div>
								<div class="table-responsive"
									style="text-align: center;">
									<table
										class="table table-striped table-responsive-sm">
										<thead>
											<tr>
												<th>#</th>
												<th>检查项目</th>
												<th>检查科室</th>
											</tr>
										</thead>
										<tbody id="flist">
											<tr v-for="(item,index) in info.list">
												<th>{{index+1}}</th>
												<td>{{item.projectName}}</td>
												<td><span
														class="badge badge-primary">{{item.subjectName}}</span>
												</td>
		
											</tr>
		
		
										</tbody>
									</table>
								</div>
		
							</div>
						</form>
					</div>
				</div>
			</div>
			<div class="col-lg-12 text-center">
				<button type="button" class="btn btn-outline-primary"
					@click="print()">打印</button>
			</div>
		
		</div>
	`
})